import { stringify } from 'qs';
import request from '@/utils/request';

export async function queryTestRule(province) {
  return request(`http://192.168.84.32:8077/GenerateOrder/RoyaltyStatistic/DueDate`, {
    method: 'POST',
    body: JSON.stringify({
      id: 1,
    }),
  });
}
export async function getRoyaltiesList(province) {
  return request(`/fss/GenerateOrder/RoyaltyStatistic`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(province),
  });
}
export async function getFilterList() {
  return request(`/fss/GenerateOrder/RoyaltyStatistic/DueDate`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

export async function getEarningDateChangeRateList(province) {
  return request(`/fss/GenerateOrder/RoyaltyStatistic/EarningDateChangeRate`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(province),
  });
}
export async function getTextBoxList(province) {
  return request(`/fss/GenerateOrder/StockSearch`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(province),
  });
}

export async function getUpsOptionList(province) {
  return request(`/fss/GenerateOrder/BossUps/RiskManage`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    /*   body:JSON.stringify(province) */
  });
}

export async function sellPutPlanList(province) {
  return request(`/fss/GenerateOrder/BossUps/SellPutPlan`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    /*   body:JSON.stringify(province) */
  });
}
export async function reCreateOrder(province) {
  return request(`/fss/GenerateOrder/BossUps/ReCreateOrder`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(province),
  });
}

export async function getETFList(province) {
  return request(`/fss/GenerateOrder/EtfRoyaltyStatistic`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(province),
  });
}
export async function getETFFilterList() {
  return request(`/fss/GenerateOrder/EtfRoyaltyStatistic/DueDate`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

// 隐含波动率
export async function getImpliedVolatility(province) {
  return request(`/fss/GenerateOrder/RoyaltyStatistic/ImpliedVolatility`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(province),
  });
}

// K线 数据 分布统计图
export async function getKlineStatistic(province) {
  return request(`/fss/GenerateOrder/KlineStatistic`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(province),
  });
}

export async function getThreeBillList(province) {
  return request(`/fss/Bill/GetList`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(province),
  });
}
export async function getSixBillList(province) {
  return request(`/fss/Bill/GetList`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(province),
  });
}
export async function getOtherBillList(province) {
  return request(`/fss/Bill/GetList`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(province),
  });
}
